import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
/**
 * Write a description of class Score here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Score extends Actor
{
    static int best = 0;
    public int score = 0,time= 0,band=1;

    public void addedToWorld(World w)
    {   act();
    }
    
    public void act()
    {   setImage(new GreenfootImage("Time: " + time + "\nBest: " + best, 20, Color.WHITE, Color.BLACK));
        setLocation(getWorld().getWidth()-50 - (getImage().getWidth()/2), getImage().getHeight()/2);
        if(band==1)
        {
            score++;
            time=score/100;
            if(best < time) best = time;
        }
    }
    public Score(int x)
    {
        band=x;
    }
}
